package com.jiannan.order.feign;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(name = "stock-service")
public interface StockService {

    /**
     * 查询库存
     *
     * @param productId
     * @return
     */
    @GetMapping(value = "/stock/getStockByProductId")
    Integer selectStockByProductId(@RequestParam("productId") Integer productId);

}